Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Added Login/Logout test #12

Merged
merged 1 commit into from Mar 3, 2012
Merged

Conversation

tallowen
Copy link
Contributor

Added appropriate methods to login region. Also, marked registration test as
xfail because of captcha

# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import random
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't use this import here you should remove it

@tallowen
Copy link
Contributor Author

Mistakes have been fixed, pep8 passes except for the 80 character rule.


from page import Page


class LoginRegion(Page):

_sign_up_link_locator = (By.CSS_SELECTOR, ".signup a")
_sign_up_link_locator = (By.CSS_SELECTOR, '.signup a')
_login_username_field = (By.CSS_SELECTOR, '.login #log')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As 'log' is a unique ID, we should use (By.ID, 'log')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all locator variables please could you add a _locator suffix? Thanks :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How am I going to keep my lines under 30 characters??? i kid :)

Added appropriate methods to login region. Also, marked failing test as
xfail because of captcha
@@ -0,0 +1,3 @@
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the MPL2 license block here pls

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't need the license in the yaml file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If its really a big deal one could just put the license in the root of the repo

@davehunt davehunt merged commit 4d34ecd into mozilla:master Mar 3, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants